<?

abstract class Model
{
	protected function createPagination($list, $page_total, $page_offset)
	{
		$get_A = array();
		foreach($_GET as $key=>$val)
		{
			if(!in_array($key, array('page_count','page_offset')))
				array_push($get_A, $key . '=' . $val);
		}
		
        $pagination = array(
			'uri' =>  $_SERVER['PHP_SELF'] . '?' . implode('&', $get_A) . '&',
			'page_count' => $page_total,
			'page_offset' => $page_offset,
            'list' => $list,
        );
        
        return $pagination;
	}
}

?>